/**
 */
package org.karelun.whiteboard.impl;

import org.eclipse.emf.common.util.EList;

import org.eclipse.emf.ecore.EClass;

import org.karelun.whiteboard.Colored;
import org.karelun.whiteboard.Graph;
import org.karelun.whiteboard.Sheet;
import org.karelun.whiteboard.WhiteboardPackage;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Sheet</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link org.karelun.whiteboard.impl.SheetImpl#getColor <em>Color</em>}</li>
 *   <li>{@link org.karelun.whiteboard.impl.SheetImpl#getGraphs <em>Graphs</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class SheetImpl extends NamedImpl implements Sheet {
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected SheetImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return WhiteboardPackage.Literals.SHEET;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getColor() {
		return (Integer)eGet(WhiteboardPackage.Literals.COLORED__COLOR, true);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setColor(int newColor) {
		eSet(WhiteboardPackage.Literals.COLORED__COLOR, newColor);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@SuppressWarnings("unchecked")
	public EList<Graph> getGraphs() {
		return (EList<Graph>)eGet(WhiteboardPackage.Literals.SHEET__GRAPHS, true);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
		if (baseClass == Colored.class) {
			switch (derivedFeatureID) {
				case WhiteboardPackage.SHEET__COLOR: return WhiteboardPackage.COLORED__COLOR;
				default: return -1;
			}
		}
		return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
		if (baseClass == Colored.class) {
			switch (baseFeatureID) {
				case WhiteboardPackage.COLORED__COLOR: return WhiteboardPackage.SHEET__COLOR;
				default: return -1;
			}
		}
		return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
	}

} //SheetImpl
